home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 7 / FM Towns Free Software Collection 7.iso / taropyon / install / _install.cci next >
Text File  |  1993-11-30  |  15KB  |  691 lines

  1. # 1 "install.cci"
  2.  
  3. # 1 "install.cci"
  4. # 13 "install.cci"
  5. char PltDat[3][16] =
  6. {
  7.  
  8. { 0, 0, 0},
  9. { 0, 0, 0},
  10. { 7, 7, 8},
  11. {12,12,13},
  12. { 6, 5, 7},
  13. { 8, 7, 9},
  14. {10, 9,11},
  15. {11,11,12},
  16.  
  17. { 5, 5, 6},
  18. { 0, 0,11},
  19. { 0,11, 0},
  20. { 0,11,11},
  21. {11, 0, 0},
  22. {11, 0,11},
  23. {11,11, 0},
  24. {14,14,15}
  25. };
  26. # 38 "install.cci"
  27. int init()
  28. {
  29. int i;
  30.  
  31. DSP_sysInit(0);
  32. KBF_sysInit();
  33. KBF_kan_off();
  34. FDL_sysInit();
  35.  
  36. sdk_control(0);
  37. for ( i = 0; i < 2; ++i )
  38. {
  39. DSP_writePage(i);
  40. DSP_setPlt( PltDat );
  41. }
  42.  
  43. DSP_writePage(1);
  44. DSP_title("INSTALL","0.99",15,7,0,0);
  45. evt_setDspTime( 1, 432, 4, 7, 0 );
  46. SYL_clear();
  47. }
  48. # 63 "install.cci"
  49. int term()
  50. {
  51. FDL_sysEnd();
  52. KBF_sysEnd();
  53. DSP_sysEnd();
  54. }
  55.  
  56. char StartPath[256];
  57. char ItmPath[256];
  58. int DlgX0 = (0x20000+((320)&0xFFFF));
  59. int DlgY0 = (0x20000+((320)&0xFFFF));
  60. # 80 "install.cci"
  61. int item_adjust_pos( short *newfrm )
  62. {
  63. if ( newfrm[2] > 621 )
  64. {
  65. newfrm[2] = 621;
  66. newfrm[0] = newfrm[2] - 24;
  67. }
  68. if ( newfrm[3] > 410 )
  69. {
  70. newfrm[3] = 410;
  71. newfrm[1] = newfrm[3] - 24;
  72. }
  73. return ((0));
  74. }
  75.  
  76. int item_set_newpos( short *newfrm )
  77. {
  78. int ret;
  79. int fpos, nextFPos;
  80. int etyNum;
  81. short icnNum;
  82. char ttlStr[128];
  83. char pathStr[128];
  84. char paraStr[128];
  85. int atrInf;
  86. int nextFPos;
  87. short frm[4];
  88.  
  89. fpos = 0;
  90. newfrm[0] = 0;
  91. newfrm[1] = 0;
  92. newfrm[2] = 0;
  93. newfrm[3] = 0;
  94. while ( (fpos = ITM_GetPhysclNextFPos( ItmPath, fpos )) > 0 )
  95. {
  96. if ( ITM_GetStair( ItmPath, fpos ) == 0 )
  97. {
  98. ret = ITM_GetItmType(ItmPath,fpos);
  99. switch ( ret )
  100. {
  101. case 1:
  102. ITM_GetGrpData(ItmPath,fpos,&etyNum,&icnNum,ttlStr,&nextFPos,frm);
  103. break;
  104. case 2:
  105. ITM_GetAplData(ItmPath,fpos,&icnNum,ttlStr,pathStr,paraStr,atrInf,frm);
  106. break;
  107. }
  108. if ( newfrm[0] < frm[2] )
  109. newfrm[0] = frm[2];
  110. if ( newfrm[1] < frm[3] )
  111. newfrm[1] = frm[3];
  112. }
  113. }
  114. newfrm[1] = newfrm[1] + 15;
  115. newfrm[2] = newfrm[0] + 24;
  116. newfrm[3] = newfrm[1] + 24;
  117.  
  118. return (item_adjust_pos( newfrm ));
  119. }
  120. # 144 "install.cci"
  121. int dsp_init(char **msg)
  122. {
  123. int i, len, x, y;
  124. char *p;
  125.  
  126. DSP_writePage(0);
  127. DSP_boxf(0,24,639,463,0,(0x1000|(((5)&15)<<4)|((6)&15)));
  128.  
  129. if ( msg )
  130. {
  131. i = 0;
  132. while ( (p = msg[i++]) != 0 )
  133. {
  134. len = strlen(p);
  135. x = (640 - len * 8)/2;
  136. y = 32 + (i * 18);
  137. DSP_str(x,y,1,5,16,p);
  138. }
  139. }
  140. }
  141. # 169 "install.cci"
  142. char *getSizMsg( char *buf, unsigned int siz )
  143. {
  144. static char tmp[32];
  145. float f;
  146.  
  147. if ( buf == 0 )
  148. buf = tmp;
  149.  
  150. if ( siz == 0 )
  151. strcpy( buf, "0");
  152. else if ( siz < 1024 )
  153. sprintf( buf, "%u", siz );
  154. else if ( siz < 1024*1024 )
  155. {
  156. f = (float)siz / (float)1024;
  157. sprintf( buf, "%.1fK", f );
  158. } else
  159. {
  160. f = (float)siz / (float)(1024*1024);
  161. sprintf( buf, "%.1fM", f );
  162. }
  163.  
  164. return (buf);
  165. }
  166. # 5 "hewin.cci"
  167. char *HewinMsg[8] =
  168. {
  169. "HEwin は,テキストエディタ,通信機能\,DOS コンソ\ール,TIFFビュワー",
  170. "等を備えたマルチウィンドゥ環境で動作するアプリケーションです。",
  171. "※  メモリ:要4Mバイト(推奨6~10Mバイト以上)",
  172. "",
  173. " ディスク容量の関係から、フロッピィディスクにはすべてのファイルは ",
  174. " 複写できません(必要最小限のファイルのみが複写されます)。",
  175. 0
  176. };
  177.  
  178. char *HewinFile1[12] =
  179. {
  180. "hewin.exp",
  181. "*.dll",
  182. "hewin.cci",
  183. "hewin.icn",
  184. "hewin.tif",
  185. "tdptmp.tbl",
  186. "*.doc",
  187. "*.hlp",
  188. 0
  189. };
  190.  
  191. char *HewinFile2[8] =
  192. {
  193.  
  194. "cci.exp",
  195. "rz.exp",
  196. "sz.exp",
  197. 0
  198. };
  199.  
  200. char *HewinFile3[5] =
  201. {
  202. "makecci.bat",
  203. "cpp.exe",
  204. "*.h",
  205. "*.cci",
  206. 0
  207. };
  208. # 51 "hewin.cci"
  209. int hewin_install()
  210. {
  211. int i, ret, len;
  212. char *btn;
  213. char *fdl;
  214. int drv;
  215. unsigned int totalFree, writeFree;
  216. char *p, tmp[256], path[256], ccipath[256], whare[256], prog[256];
  217. short frm[4];
  218. char *aplname, *dirname, *srcdir;
  219.  
  220. aplname = "HEwin";
  221. dirname = "HEWIN";
  222. srcdir = " :/TAROPYON/HEWIN/";
  223. srcdir[0] = StartPath[0];
  224.  
  225. dsp_init(HewinMsg);
  226.  
  227. _RETRY:
  228. DSP_writePage(1);
  229. btn = MNU_allocBtn( 2 );
  230. MNU_setBtn( btn, 0, '\r' , 0x7300 , 1, "INSTALL : [実行]" );
  231. MNU_setBtn( btn, 1, '\x1B', 0x7200, 2, "CANECEL : [取消]" );
  232. ret = MNU_selectBtn( DlgX0, DlgY0,
  233. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (0), 2, btn,
  234. "    %s のインストールを行いますか?  ", aplname );
  235. MNU_freeBtn( btn );
  236. if ( ret != 1 )
  237. return (0);
  238.  
  239. DLG_tmpMsgTime( DlgX0, DlgY0,
  240. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)),
  241. 3, "\n    インストール先に移動してください。  \n" );
  242.  
  243.  
  244. if ( (fdl = FDL_open(0)) == 0 )
  245. return (-1);
  246. FDL_set_title( fdl,"インストール先指定");
  247. FDL_set_wildcard( fdl, "*.*");
  248. ret = FDL_start(fdl);
  249. if ( ret == (0) )
  250. {
  251. drv = FDL_get_drv(fdl);
  252. strcpy( whare, FDL_get_whare(fdl) );
  253. }
  254. FDL_close(fdl);
  255. if ( ret )
  256. goto _RETRY;
  257.  
  258.  
  259. if ( FS_getDskFree( drv, &totalFree, &writeFree) )
  260. {
  261. DLG_tmpMsgTime( DlgX0, DlgY0,
  262. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)),
  263. 3, "    ディスクの準備ができていません。  " );
  264. goto _RETRY;
  265. }
  266. if ( writeFree < 1167*1024 || (drv > 1 && writeFree < 3*1024*1024) )
  267. {
  268. ret = MNU_sure( DlgX0, DlgY0,
  269. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)), (1),
  270. "  %c: Disk free space %u [%s] byte(s)  \n    ディスク容量が足りません。  ",
  271. drv + 'A', writeFree, getSizMsg(0,writeFree) );
  272. if ( ret != (1) )
  273. goto _RETRY;
  274. }
  275.  
  276. sprintf( tmp, "%c:/%s", drv+'A', whare );
  277. len = strlen(tmp);
  278. if ( len > 0 && tmp[len-1] != '/' && tmp[len-1] != '\\' )
  279. {
  280. tmp[len++] = '/';
  281. tmp[len] = '\0';
  282. }
  283. sprintf( path, "%s%s", tmp, dirname );
  284.  
  285. ret = FS_isFileExist(path);
  286. if ( ret == 0 )
  287. {
  288.  
  289. btn = MNU_allocBtn( 2 );
  290. MNU_setBtn( btn, 0, '\r' , 0x7300 , 1, "MKDIR : [実行]" );
  291. MNU_setBtn( btn, 1, '\x1B', 0x7200, 2, "CANECEL : [取消]" );
  292. ret = MNU_selectBtn( DlgX0, DlgY0,
  293. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (1), 2, btn,
  294. "    インストール先にディレクトリを作成します。  \n%s", path );
  295. MNU_freeBtn( btn );
  296. if ( ret != 1 )
  297. goto _RETRY;
  298. FS_mkdir(path);
  299. } else if ( ret == 1 )
  300. {
  301. MNU_sure( DlgX0, DlgY0,
  302. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)), (1),
  303. "    %s    \n    インストール先に同名のファイルが存在しています。  ", path );
  304. goto _RETRY;
  305. }
  306.  
  307.  
  308. btn = MNU_allocBtn( 2 );
  309. MNU_setBtn( btn, 0, '\r' , 0x7300 , 1, "INSTALL : [実行]" );
  310. MNU_setBtn( btn, 1, '\x1B', 0x7200, 2, "CANECEL : [取消]" );
  311. ret = MNU_selectBtn( DlgX0, DlgY0,
  312. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (1), 2, btn,
  313. "インストール先 : %s\n  Disk free space %u [%s] byte(s)  \n\n    インストールを行いますか?  ",
  314. path, writeFree, getSizMsg(0,writeFree) );
  315. MNU_freeBtn( btn );
  316. if ( ret != 1 )
  317. goto _RETRY;
  318.  
  319.  
  320. sprintf( tmp, "%s.", srcdir );
  321. FS_chdrv( toupper(srcdir[0]) - 'A' );
  322. FS_chdir( tmp );
  323.  
  324.  
  325. ret = i = 0;
  326. while ( (p = HewinFile1[i++]) != 0 && ret == 0 )
  327. {
  328. SYL_puts( 12, "copy %s", p );
  329. ret = FM_fcopy( p, 0x00, (0x01)|(0x80), path, "" );
  330. }
  331.  
  332. if ( drv > 1 && ret == (0) )
  333. {
  334. ret = i = 0;
  335. while ( (p = HewinFile2[i++]) != 0 && ret == 0 )
  336. {
  337. SYL_puts( 12, "copy %s", p );
  338. if ( FS_isFileExist(p) == 0 )
  339. continue;
  340. ret = FM_fcopy( p, 0x00, (0x01)|(0x80), path, "" );
  341. }
  342. }
  343.  
  344. if ( drv > 1 && ret == (0) )
  345. {
  346.  
  347. sprintf( tmp, "%sCCISRC", srcdir );
  348. FS_chdrv( toupper(srcdir[0]) - 'A' );
  349. FS_chdir( tmp );
  350.  
  351. sprintf( ccipath, "%s/CCISRC", path );
  352. if ( (ret = FS_isFileExist(tmp)) == 0 )
  353. {
  354. FS_mkdir(ccipath);
  355. } else if ( ret == 1 )
  356. {
  357. MNU_sure( DlgX0, DlgY0,
  358. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)), (1),
  359. "    %s    \n    インストール先に同名のファイルが存在しています。  ", ccipath );
  360. goto _RETRY;
  361. }
  362. ret = i = 0;
  363. while ( (p = HewinFile3[i++]) != 0 && ret == 0 )
  364. {
  365. SYL_puts( 12, "copy %s", p );
  366. ret = FM_fcopy( p, 0x00, (0x01)|(0x80), ccipath, "" );
  367. }
  368. }
  369.  
  370. if ( ret )
  371. {
  372. MNU_sure( DlgX0, DlgY0,
  373. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)), (1),
  374. "FILE COPY ERROR\n    インストールに失敗しました。  " );
  375. return (-1);
  376. }
  377.  
  378.  
  379. SYL_puts( 12, "アイテム登録" );
  380. sprintf( ItmPath, "%c:\\tmenu.itm", drv+'A');
  381. if ( FS_isFileExist(ItmPath) == 0 )
  382. {
  383. ITM_CreateItemFile(ItmPath);
  384. }
  385. item_set_newpos( frm );
  386.  
  387. ret = MNU_sure( DlgX0, DlgY0,
  388. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (1),
  389. "    item file %s    \n    アイテム登録を行います。  ", ItmPath );
  390. if ( ret == (1) )
  391. {
  392. sprintf( tmp, "%s/%s", path, HewinFile1[0]);
  393. FS_unix2dos( prog, tmp+2 );
  394. FS_strupr( prog );
  395. ITM_AddAplItem( ItmPath, 0, 1024, "HEwin", prog, "", 2, frm );
  396. }
  397.  
  398. SYL_puts( 12, "***** Completed *****");
  399. DLG_tmpMsgTime( DlgX0, DlgY0,
  400. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)),
  401. 3, "    インストール終了しました。  " );
  402.  
  403. return (0);
  404. }
  405. # 7 "gsplay.cci"
  406. char *GsplayMsg[12] =
  407. {
  408. "GSPLAYはMIDI用演奏データを演奏するプログラムです。",
  409. "データファイルはスタンダードMIDIファイル(ファイル名の拡張子は.MID)と",
  410. "EUPHONY 形式(ファイル名の拡張子は.EUP)に対応しています。",
  411. "ただし,内蔵音源用に作成されたEUP ファイルは演奏できません。",
  412. "TOWNS の内蔵音源をGS規格相当の音源として動作させることもでき,",
  413. "この場合,GS音源用に作成された演奏データを",
  414. "TOWNS の内蔵音源で再生することができます。",
  415.  
  416.  
  417.  
  418. "※ 内蔵音源で演奏させる場合には別途,音色データファイルが必要です。",
  419.  
  420. 0
  421. };
  422.  
  423. char *GsplayFile1[6] =
  424. {
  425. "gsplay.exp" ,
  426. "gsplay.doc",
  427. "gstone.dat",
  428. "gsrym.dat",
  429. "*.mex",
  430. 0
  431. };
  432. # 54 "gsplay.cci"
  433. int gsplay_install()
  434. {
  435. int i, ret, len;
  436. char *btn;
  437. char *fdl;
  438. int drv;
  439. unsigned int totalFree, writeFree;
  440. char *p, tmp[256], path[256], ccipath[256], whare[256], prog[256];
  441. short frm[4];
  442. char *aplname, *dirname, *srcdir;
  443. int gsdata, gsdev;
  444.  
  445. aplname = "GSPLAY";
  446. dirname = "GSPLAY";
  447. srcdir = " :/TAROPYON/GSPLAY/";
  448. srcdir[0] = StartPath[0];
  449.  
  450. dsp_init(GsplayMsg);
  451.  
  452. _RETRY:
  453. DSP_writePage(1);
  454. btn = MNU_allocBtn( 2 );
  455. MNU_setBtn( btn, 0, '\r' , 0x7300 , 1, "INSTALL : [実行]" );
  456. MNU_setBtn( btn, 1, '\x1B', 0x7200, 2, "CANECEL : [取消]" );
  457. ret = MNU_selectBtn( DlgX0, DlgY0,
  458. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (0), 2, btn,
  459. "    %s のインストールを行いますか?  ", aplname );
  460. MNU_freeBtn( btn );
  461. if ( ret != 1 )
  462. return (0);
  463.  
  464.  
  465. btn = MNU_allocBtn( 3 );
  466. MNU_setBtn( btn, 0, 'B', 0x2E00, 1 , "Board MIDI :[N]" );
  467. MNU_setBtn( btn, 1, 'R', 0x1400, 2 , "RS-232C MIDI : [R]" );
  468. MNU_setBtn( btn, 2, 'T', 0x1500, 3, "TOWNS only : [T]" );
  469. ret = MNU_selectBtn( DlgX0, DlgY0,
  470. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (1), 3, btn,
  471. "  使用するMIDIインターフェースを指定してください。\n\n%s\n%s\n%s",
  472. "Board  MIDI  : FMT-401/402/403,MC-P23T",
  473. "RS-232C MIDI : RS-232C MIDI アダプタ  ",
  474. "TOWNS only   : 内蔵音源のみ           "
  475. );
  476. MNU_freeBtn( btn );
  477.  
  478. if ( ret < 1 || ret > 3 )
  479. goto _RETRY;
  480. gsdev = ret;
  481.  
  482. DLG_tmpMsgTime( DlgX0, DlgY0,
  483. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)),
  484. 3, "\n    インストール先に移動してください。  \n" );
  485.  
  486.  
  487. if ( (fdl = FDL_open(0)) == 0 )
  488. return (-1);
  489. FDL_set_title( fdl,"インストール先指定");
  490. FDL_set_wildcard( fdl, "*.*");
  491. ret = FDL_start(fdl);
  492. if ( ret == (0) )
  493. {
  494. drv = FDL_get_drv(fdl);
  495. strcpy( whare, FDL_get_whare(fdl) );
  496. }
  497. FDL_close(fdl);
  498. if ( ret )
  499. goto _RETRY;
  500.  
  501.  
  502. if ( FS_getDskFree( drv, &totalFree, &writeFree) )
  503. {
  504. DLG_tmpMsgTime( DlgX0, DlgY0,
  505. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)),
  506. 3, "    ディスクの準備ができていません。  " );
  507. goto _RETRY;
  508. }
  509. if ( writeFree < 544*1024 )
  510. {
  511. ret = MNU_sure( DlgX0, DlgY0,
  512. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)), (1),
  513. "  %c: Disk free space %u [%s] byte(s)  \n    ディスク容量が足りません。  ",
  514. drv + 'A', writeFree, getSizMsg(0,writeFree) );
  515. if ( ret != (1) )
  516. goto _RETRY;
  517. }
  518.  
  519. sprintf( tmp, "%c:/%s", drv+'A', whare );
  520. len = strlen(tmp);
  521. if ( len > 0 && tmp[len-1] != '/' && tmp[len-1] != '\\' )
  522. {
  523. tmp[len++] = '/';
  524. tmp[len] = '\0';
  525. }
  526. sprintf( path, "%s%s", tmp, dirname );
  527.  
  528. ret = FS_isFileExist(path);
  529. if ( ret == 0 )
  530. {
  531.  
  532. btn = MNU_allocBtn( 2 );
  533. MNU_setBtn( btn, 0, '\r' , 0x7300 , 1, "MKDIR : [実行]" );
  534. MNU_setBtn( btn, 1, '\x1B', 0x7200, 2, "CANECEL : [取消]" );
  535. ret = MNU_selectBtn( DlgX0, DlgY0,
  536. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (1), 2, btn,
  537. "    インストール先にディレクトリを作成します。  \n%s", path );
  538. MNU_freeBtn( btn );
  539. if ( ret != 1 )
  540. goto _RETRY;
  541. FS_mkdir(path);
  542. } else if ( ret == 1 )
  543. {
  544. MNU_sure( DlgX0, DlgY0,
  545. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)), (1),
  546. "    %s    \n    インストール先に同名のファイルが存在しています。  ", path );
  547. goto _RETRY;
  548. }
  549.  
  550.  
  551. btn = MNU_allocBtn( 2 );
  552. MNU_setBtn( btn, 0, '\r' , 0x7300 , 1, "INSTALL : [実行]" );
  553. MNU_setBtn( btn, 1, '\x1B', 0x7200, 2, "CANECEL : [取消]" );
  554. ret = MNU_selectBtn( DlgX0, DlgY0,
  555. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (1), 2, btn,
  556. "インストール先 : %s\n  Disk free space %u [%s] byte(s)  \n\n    インストールを行いますか?  ",
  557. path, writeFree, getSizMsg(0,writeFree) );
  558. MNU_freeBtn( btn );
  559. if ( ret != 1 )
  560. goto _RETRY;
  561.  
  562.  
  563. sprintf( tmp, "%s.", srcdir );
  564. FS_chdrv( toupper(srcdir[0]) - 'A' );
  565. FS_chdir( tmp );
  566.  
  567.  
  568. ret = i = 0;
  569. while ( (p = GsplayFile1[i++]) != 0 && ret == 0 )
  570. {
  571. SYL_puts( 12, "copy %s", p );
  572. ret = FM_fcopy( p, 0x00, (0x01)|(0x80), path, "" );
  573. }
  574.  
  575. if ( ret == (0) )
  576. {
  577. # 249 "gsplay.cci"
  578. if ( gsdev == 3 )
  579. {
  580. MNU_sure( DlgX0, DlgY0,
  581. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)), (1),
  582. " 内蔵音源用の音色データファイルは\nインストールされませんので\n別途用意してください。" );
  583. }
  584.  
  585. }
  586.  
  587. if ( ret )
  588. {
  589. MNU_sure( DlgX0, DlgY0,
  590. 1, 3, (0x1000|(((10)&15)<<4)|((7)&15)), (1),
  591. "FILE COPY ERROR\n    インストールに失敗しました。  " );
  592. return (-1);
  593. }
  594.  
  595.  
  596. SYL_puts( 12, "アイテム登録" );
  597. sprintf( ItmPath, "%c:\\tmenu.itm", drv+'A');
  598. if ( FS_isFileExist(ItmPath) == 0 )
  599. {
  600. ITM_CreateItemFile(ItmPath);
  601. }
  602.  
  603. ret = MNU_sure( DlgX0, DlgY0,
  604. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)), (1),
  605. "    item file %s    \n    アイテム登録を行います。  ", ItmPath );
  606. if ( ret == (1) )
  607. {
  608. sprintf( tmp, "%s/%s", path, GsplayFile1[0]);
  609. FS_unix2dos( prog, tmp+2 );
  610. FS_strupr( prog );
  611. item_set_newpos( frm );
  612.  
  613. if ( gsdev == 1 )
  614. {
  615. ITM_AddAplItem( ItmPath, 0, 1024, "GSPLAY/midi", prog, "", 2, frm );
  616. } else if ( gsdev == 2 )
  617. {
  618. ITM_AddAplItem( ItmPath, 0, 1024, "GSPLAY/rs", prog, "-rsmidi -gsPort R", 2, frm );
  619. }
  620. if ( gsdata )
  621. {
  622. frm[0] += 48;
  623. frm[2] += 48;
  624. item_adjust_pos( frm );
  625. ITM_AddAplItem( ItmPath, 0, 1024, "GSPLAY/int", prog, "-intPort A", 2, frm );
  626. }
  627. }
  628.  
  629. SYL_puts( 12, "***** Completed *****");
  630. DLG_tmpMsgTime( DlgX0, DlgY0,
  631. 1, 3, (0x1000|(((12)&15)<<4)|((7)&15)),
  632. 3, "    インストール終了しました。  " );
  633.  
  634. return (0);
  635. }
  636. # 201 "install.cci"
  637. char *InstallMsg[8] =
  638. {
  639. " HEwin   … 超弩級アプリケーション・プロセッサ HEwin                 ",
  640. " GSPLAY  … MIDI sound display system GSPLAY / [GS] emulation player ",
  641. "",
  642. " EXIT    … 終了                                                     ",
  643. 0
  644. };
  645.  
  646. int install()
  647. {
  648. int ret;
  649. char *obj;
  650. char *mnu;
  651.  
  652. obj = MNU_alloc(4);
  653. MNU_setObj(obj, 0, (2), 'H', "HEwin" , 0,(1) , 0 );
  654. MNU_setObj(obj, 1, (2), 'G', "GSPLAY", 0,(2), 0 );
  655. MNU_setObj(obj, 2, (0), 0 , 0 , 0, 0 , 0 );
  656. MNU_setObj(obj, 3, (2), 'X', "EXit" , 0,(9999) , 0 );
  657.  
  658. do
  659. {
  660. dsp_init(InstallMsg);
  661.  
  662. DSP_writePage(1);
  663. mnu = MNU_open( DlgX0, DlgY0, (1), obj, "INSTALLER MENU" );
  664. ret = MNU_start ( mnu );
  665. MNU_close(mnu);
  666. switch ( ret )
  667. {
  668. case (1): hewin_install(); break;
  669. case (2): gsplay_install(); break;
  670. }
  671. } while ( ret >= 0 && ret != (9999) );
  672. MNU_free(obj);
  673.  
  674. return ((0));
  675. }
  676. # 245 "install.cci"
  677. int main( int argc, char **argv )
  678. {
  679. char tmp[256];
  680.  
  681. init();
  682.  
  683. FS_setFullPathname( tmp, argv[0] );
  684. FS_getDnam( StartPath, tmp );
  685.  
  686. install();
  687.  
  688. term();
  689. return (0);
  690. }
  691.